package com.knife.blog.logic;

import java.util.Collection;
import java.util.Date;
import java.util.List;

//import com.knife.blog.domain.BlogCircle;
import com.knife.blog.domain.BlogCircleMember;
import com.knife.blog.domain.BlogInfo;
import com.knife.web.tools.IPageList;

public interface BlogCircleService {

	/*BlogCircle getBlogCircle(String inputuser);
	
	BlogCircle getBlogCircle(String fieldName,String value);
	
	BlogCircle getBlogCircleByCid(String cid);*/
	
	BlogInfo getBlogCircle(String inputuser);
	
	BlogInfo getBlogCircle(String fieldName,String value);
	
	BlogInfo getBlogCircleByCid(String cid);

	boolean addBlogCircle(BlogInfo circle);

	boolean delBlogCircle(String cid);
	boolean delBlogCircleByID(String cid);

	int batchDelBlogCircle(String[] cids);
	int batchDelBlogCircleByID(String[] cids);

	boolean updateBlogCircle(BlogInfo circle);

	// 列出所有圈子
	IPageList queryBlogCircle(Collection paras  , String scope, int currentPage, int pageSize);
	
	IPageList queryBlogCircle(String username, String circleSn, String dirId,
			Date date1, Date date2, int currentPage, int pageSize);
	IPageList queryBlogCircle(String circleSn, String dirId,
			Date date1, Date date2, int currentPage, int pageSize);
	IPageList queryBlogCircle(String circleSn, String dirId,
			Date date1, Date date2, int currentPage, int pageSize,String title);
	IPageList queryBlogCircle(String scope , Collection paras, int currentPage, int pageSize);

	// 列出某人所在的圈子
	IPageList queryUserCircle(String username);
	
	IPageList queryOnwerCircle(String username);
	
	List queryBlogCircle();
	
	List queryBlogCircle(String parentCid);

	// 加入一圈子
	void joinBlogCircle(BlogInfo circle, BlogCircleMember member);

	BlogCircleMember getBlogCircleMember(String cid);

	boolean addBlogCircleMember(BlogCircleMember member);

	boolean delBlogCircleMember(String cid);

	int batchDelBlogCircleMember(String[] cids);

	boolean updateBlogCircleMember(BlogCircleMember member);

	// 列出圈子中的所有成员
	IPageList queryBlogCircleMember(BlogInfo circle, int currentPage,
			int pageSize);
	
	IPageList queryAllUserCircle(String username);
	
	IPageList queryAllUserCircle(String username, int currentPage, int pageSize);

	// 查询圈子文章信息
	/**
	 * 
	 */
	IPageList queryBlogNewsDoc(BlogInfo circle, String username, int elite,
			java.util.Date date1, java.util.Date date2, String orderBy,
			int currentPage, int pageSize);

}
